Skip to content

Conversation

TheBlueMatt
Copy link
Collaborator

@TheBlueMatt TheBlueMatt commented Aug 18, 2025

Based on #4007 this does the actual integration. Will probably go after #3979 so drafting for now.

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 65.15152% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.76%. Comparing base (a18f362) to head (d9a278c).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/channel.rs 53.33% 7 Missing ⚠️
lightning/src/ln/channelmanager.rs 61.11% 6 Missing and 1 partial ⚠️
lightning/src/util/ser.rs 0.00% 7 Missing ⚠️
lightning/src/ln/quiescence_tests.rs 92.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4019      +/-   ##
==========================================
- Coverage   88.76%   88.76%   -0.01%     
==========================================
  Files         176      176              
  Lines      128139   128185      +46     
  Branches   128139   128185      +46     
==========================================
+ Hits       113743   113777      +34     
- Misses      11822    11828       +6     
- Partials     2574     2580       +6     
Flag Coverage Δ
fuzzing 21.90% <2.50%> (-0.02%) ⬇️
tests 88.59% <65.15%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheBlueMatt TheBlueMatt force-pushed the 2025-08-splice-quiescent-real branch from be3b93a to ddb3b37 Compare August 20, 2025 17:25
let tx16 = TransactionU16LenLimited::new(tx)
.map_err(|_e| APIError::APIMisuseError { err: format!("Too large transaction") })?;

// TODO(splicing): Check that transactions aren't too big for the splice_init message here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably just want to do all input validation here before we even attempt quiescence so that we can fail early and fast. No point in going through the whole stfu dance just to immediately fail back to the user with "insufficient fees" or something similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's definitely the goal. Kinda leaving this until the parameters are clear and I'll clean it up then.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Aug 21, 2025

👋 Thanks for assigning @jkczyz as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

When doing an outbound splice, we check some of the instructions
first in utility methods, then convert errors to `APIError`s. These
utility methods should thus either return an `APIError` or more
generic (string or `()`) error type, but they currently return a
`ChannelError`, which is only approprite when the calling code will
do what the `ChannelError` instructs (including closing the
channel).

Here we fix that by returning `String`s instead.
Now that we have a `QuiescentAction` to track what we intend to do
once we reach quiescence, we need to use it to initiate splices.

Here we do so, adding a new `SpliceInstructions` to track the
arguments that are currently passed to `splice_channel`. While
these may not be exactly the right arguments to track in the end,
a lot of the splice logic is still in flight, so we can worry about
it later.
While we have a test to disconnect a peer if we're waiting on an
`stfu` message, we also disconnect if we've reached quiescence but
we're waiting on a peer to do "something fundamental" and they take
too long to do so. We test that behavior here.
@TheBlueMatt TheBlueMatt force-pushed the 2025-08-splice-quiescent-real branch from ddb3b37 to d9a278c Compare August 26, 2025 16:36
@TheBlueMatt TheBlueMatt marked this pull request as ready for review August 26, 2025 16:36
@wpaulino wpaulino requested review from jkczyz and removed request for valentinewallace August 26, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants